home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / vdtj122b.zip / DEMO3.VDM < prev    next >
Text File  |  1992-11-30  |  19KB  |  572 lines

  1. RI(9)/VEDIT Family - Basic Editing/
  2. M(H)
  3.  
  4. YT/
  5. This demo uses "windows" to let you edit in one window while the other window
  6. gives instructions.  In practice you can have the "editing window" fill the
  7. entire screen.
  8.  
  9. Although VEDIT Jr. does not have windows, all editing features described here
  10. are available on VEDIT Jr.  References to "VEDIT" apply to all VEDIT Family
  11. editors.
  12.  
  13. Feel free to experiment.  Don't be concerned about modifying the text.  Any
  14. changes you make won't be permanent (as long as you don't use the {FILE} menu
  15. to save files).
  16.  
  17. REMEMBER:    Press <Esc> to continue to the next step.
  18.  
  19.         Press <Alt-F8> to return to the Main Menu.
  20.  
  21.         Press <F1> for on-line help.
  22.  
  23. /
  24. M(K)
  25. 9XS(100)        !Need 9 line window
  26. M(W)            !Create instruction window; set attributes
  27. B#K            !Empty edit buffer
  28. EB demo.txt        !Load demo file
  29. 6L            !Start in middle of text
  30.  
  31. EE(1)            !Switch to edit buffer 1
  32. B#K
  33. I/There are 20 cursor movement keys.   The most commonly used one are:
  34.  
  35. <Cursor Up>    Move up one line        <Cursor Right> Move to next char.
  36. <Cursor Down>  Move down one line      <Cursor Left>  Move to prev. char.
  37. <Home>         Move to begin of line   <Pg Up>        Move up a "Page"
  38. <End>          Move to end of line     <Pg Dn>        Move down a "Page"
  39. <Ctrl-Enter>   Move to next line
  40.  
  41. Try these cursor movement keys.  --- Then press <Esc> to continue ---/
  42.  
  43. B -V            !Display text
  44. EE(@)            !Switch back to main edit buffer
  45. V
  46.  
  47. EE(1)
  48. B#K
  49. I\Other cursor movement keys help with word processing:
  50.  
  51. <F5>         Move to previous word      <F6>         Move to next word
  52. <Ctrl-F5>    Move to prev. paragraph    <Ctrl-F6>    Move to next paragraph
  53. <Ctrl-Home>  Move to top of screen      <Ctrl-End>   Move to bottom of screen
  54. <Ctrl-PgUp>  Move to beginning of file  <Ctrl-PgDn>  Move to end of file
  55.  
  56.         --- Press <Esc> to continue ---\
  57.  
  58. B -V
  59. EE(@)
  60. V
  61.  
  62. EE(1)
  63. B#K
  64. I/Sometimes lines are longer than the screen.  These lines can be viewed and
  65. edited using the two "horizontal scrolling" keys:
  66.  
  67. <Shft-Right Arrow>    Scrolls the screen towards the end of the line
  68. <Shft-Left Arrow>    Scrolls the screen back to the beginning of the line
  69.  
  70. Try these horizontally scrolling keys.  Notice how the text shifts sideways.
  71.  
  72.         --- Press <Esc> to continue ---/
  73. B -V
  74. EE(@)
  75. V
  76.  
  77.  R* 0YWS        !Reset horizontal scroll margin
  78. EE(1)
  79. B#K
  80. I/You can enter new text at the cursor by simply typing it.  Press <Ins> if
  81. you want the text to be inserted instead of overwriting existing text.  (Note
  82. that "INS" appears on the "status line" when you are in "Insert mode".)  Two
  83. keys let you delete single characters.
  84.  
  85. <Ins>    Toggle "Insert" mode    Text    New text is entered at cursor
  86. <Del>    Deletes char at cursor    <Bksp>    Deletes previous char
  87.  
  88. Try some simple changes to the text.    --- Press <Esc> to continue ---/
  89.  
  90. B -V
  91. EE(@)
  92. V
  93.  
  94. EE(1)
  95. B#K
  96. I/To insert a new line of text, first move the cursor to the end of the
  97. previous line (use <Up Arrow> and <End>).  Be sure you are in Insert Mode and
  98. then press <Enter>.  This inserts a new line (which is initially blank).  Now
  99. enter the line of text.  You can press <Enter> again to insert another line.
  100.  
  101. If you press <Enter> with the cursor in the middle of a line, the line is
  102. split into two lines.  (Press <Backspace> to merge the lines back together.)
  103.  
  104.         --- Press <Esc> to continue ---/
  105. B -V
  106. EE(@)
  107. V
  108.  
  109. EE(1)
  110. B#K
  111. I/Most editing functions can be accessed using the "pull-down" menus.  As you
  112. become more familiar with VEDIT you can also access editing functions directly
  113. using Function and CTRL keys.  This saves steps by bypassing the menus.  Press
  114. <F10> to start the menu system.  Use the cursor keys to move around the menus.
  115.  
  116. Pressing <Esc> removes the menus one level at a time.  Pressing <Ctrl-C>
  117. removes the menus at once.  (This is the "CANCEL" function.)
  118.  
  119.     --- Remove the Menu system and press <Esc> to continue ---/
  120. B -V
  121. EE(@)
  122. V
  123.  
  124. EE(1)
  125. B#K
  126. I/As you moved around the menus in the previous step, sub-menus were not
  127. displayed until you selected them. This is the norm with most Microsoft and
  128. Borland products. We have now enabled "sub-menu preview" so that sub-menus are
  129. displayed before you select them; we think this makes it easier to browse a
  130. menu system.  (Sub-menus are always previewed when using a mouse.)
  131.  
  132. Press <F10> again to start the menu system. Notice how sub-menus are now
  133. previewed. If desired, toggle "Enable sub-menu preview" in the {CONFIG, Screen
  134. display} sub-menu.     --- Press <Esc> to continue ---/
  135.  
  136. B -V
  137. EE(@)
  138. YJN 11 1    R* Enable sub-menu preview
  139. V
  140.  
  141. EE(1)
  142. B#K
  143. I/To display the ASCII table from the menu system first press <F10>.  Select the
  144. {MISC} menu by typing "M".  (Or you can highlight "Misc" using <Cursor Right>
  145. and <Cursor Left> and then press <Enter>.)  Select "ASCII Table" by typing
  146. "A". (Or you can highlight "ASCII table" using <Cursor Up> and <Cursor Down>
  147. and then press <Enter>.)
  148.  
  149. Press <Enter> after each "page" of the displayed table.  Following the last
  150. page, the menu system will remove itself.
  151.         --- Press <Esc> to continue ---/
  152. B -V
  153. EE(@)
  154. V
  155.  
  156. EE(1)
  157. B#K
  158. I\If you have a mouse, move the mouse to the top screen line and click the left
  159. button.  This brings up the menu system.  You can select an item by first
  160. clicking on its menu name and then on the desired item.  Or you can navigate
  161. the menu by holding down the left button.  Sliding the mouse along the top
  162. screen line displays each menu.  Sliding the mouse up/down highlights each
  163. item or sub-menu.  Placing the mouse on an item and releasing the left button
  164. selects the item.
  165.  
  166.           --- Press <Esc> to continue ---\
  167. B -V
  168. EE(@)
  169. V
  170.  
  171. EE(1)
  172. B#K
  173. I/On-line help is available at any time by pressing <F1>.  It first displays a
  174. keyboard layout listing which key(s) access each editing function.  To get
  175. help on a particular function just press the associated key.
  176.  
  177. For example, for help with searching, first press <F1> and then <F2>.
  178.  
  179. -- OR -- Press <Enter> (twice) to see the first of two screens which
  180.      summarize the built-in keystroke macros.
  181.         --- Press <Esc> to continue ---/
  182. B -V
  183. EE(@)
  184. V
  185.  
  186. EE(1)
  187. B#K
  188. I/If you press <F1> and then press <Enter> about four times, you will see a
  189. list of topics for which on-line help is available.
  190.  
  191. For example, for an explanation of how to insert control and graphics
  192. characters, first press <F1>; then press <Enter> four times; then type "IC"
  193. and <Enter>.
  194.  
  195.         --- Press <Esc> to continue ---/
  196. B -V
  197. EE(@)
  198. V
  199.  
  200. EE(1)
  201. B#K
  202. I/Pressing <F1> within the menu system gives you an explanation of the functions
  203. available in the currently displayed menu.  (Pressing the right button on a
  204. mouse does the same thing.)
  205.  
  206. Experiment with the menu system by using <Cursor Right> and <Cursor Left> to
  207. display different menus and then pressing <F1> from each menu.
  208.  
  209.         --- Press <Esc> to continue ---/
  210. B -V
  211. EE(@)
  212. V
  213.  
  214. EE(1)
  215. B#K
  216. I\If you have a mouse, it can also be used to scroll to other parts of the file,
  217. highlight and copy/move blocks, access help and switch between windows.
  218.  
  219. The mouse operations are fully described in the on-line help.  To access it
  220. press <F1> (or select "General" in the {HELP} menu).  At the prompt for the
  221. desired function key click the left button.  Or select "Mouse" from the help
  222. topics.
  223.  
  224.         --- Press <Esc> to continue ---\
  225.  
  226. B -V
  227. EE(@)
  228. V
  229.  
  230.  
  231.  
  232. EE(1)
  233. B#K
  234. I/You can quickly delete lines or words with these keys:
  235.  
  236. <Ctrl-Z>    Delete text from cursor to end of line.
  237. <Ctrl-X>    Delete entire line.  The cursor can be anywhere on the line.
  238.  
  239. <Alt-F5>    Delete the previous word.
  240. <Alt-F6>    Delete the next word.
  241.  
  242. Try these deletion keys.  --- Then press <Esc> to continue ---/
  243.  
  244. B -V
  245. EE(@)
  246. V
  247.  
  248. EE(1)
  249. B#K
  250. I/You can "undo" most changes keystroke by keystroke or line by line.  To undo
  251. the previous keystroke press <Alt-Bksp>.  To undo the keystroke before that
  252. press <Alt-Bksp> again, and so on.
  253.  
  254. To undo all the changes made to a line press <Ctrl-U>.  Pressing <Ctrl-U>
  255. again moves to the previous line you were on.  Pressing <Ctrl-U> a third time
  256. restores the previous line, and so on.
  257.  
  258. Try the undo functions.  --- Then press <Esc> to continue ---/
  259.  
  260. B -V
  261. EE(@)
  262. V
  263.  
  264. EE(1)
  265. B#K
  266. I/The undo keys <Alt-Bksp> and <Ctrl-U> are "keystroke macros" (sometimes called
  267. "hot keys") which directly access functions within the {EDIT, Undo} sub-menu.
  268.  
  269. <Alt-Bksp> is equivalent to {EDIT, Undo, Edit}.
  270. <Ctrl-U>   is equivalent to {EDIT, Undo, Line}.
  271.  
  272. Another topic describes "keystroke macros" in detail.
  273.  
  274.         --- Press <Esc> to continue ---/
  275. B -V
  276. EE(@)
  277. V
  278.  
  279. EE(1)
  280. B#K
  281. I/Additional keystroke macros permit direct access to each of the menus:
  282. <Alt-B> selects {BLOCK} menu        <Alt-M> selects {MISC} menu
  283. <Alt-C> selects {CONFIG} menu        <Alt-P> selects {PRINT} menu
  284. <Alt-E> selects {EDIT} menu        <Alt-S> selects {SEARCH} menu
  285. <Alt-F> selects {FILE} menu        <Alt-W> selects {WINDOW} menu
  286. <Alt-G> selects {GOTO} menu            (VEDIT and VEDIT PLUS only)
  287. <Alt-H> selects {HELP} menu
  288.  
  289.     Note: It is <ALT> and the 1st letter of the menu.
  290.     --- Remove the menu system and press <Esc> to continue ---/
  291. B -V
  292. EE(@)
  293. V
  294.  
  295. EE(1)
  296. B#K
  297. I/You can easily enter graphics characters and create "boxes".  For example:
  298.  
  299. ╔════════════════════════════════════════════════╗
  300.  
  301. First type <Alt>-201 (hold down the <Alt> key and type 201 on the KEYPAD).
  302. Then press <Ctrl-R>, enter "48" and type <Alt>-205.  Last type <Alt>-187.
  303. Note: You must type "201" on the KEYPAD (cursor keys)!
  304.  
  305. Note:  <Ctrl-R> is the [REPEAT] function.  --- Press <Esc> to continue ---/
  306.  
  307. B -V
  308. EE(@)
  309. Z
  310. V
  311.  
  312. EE(1)
  313. B#K
  314. I\You could use the {BLOCK} menu to copy/move blocks of text, but special block
  315. functions are quicker.  First, move the cursor to the 1st character in the
  316. block.  Then press <F9> to set the 1st block marker.  Now highlight the block
  317. by moving the cursor one position PAST the LAST desired character in the
  318. block.  (This is generally the beginning of the next line.)  Press <F9> again
  319. to set the 2nd block marker.  Now move the cursor to the desired destination
  320. for the block.  Now press <Ctrl-F9> to copy the block; or press <Alt-F9> to
  321. move the block.
  322.  
  323.         --- Press <Esc> to continue ---\
  324. B -V
  325. EE(@)
  326. V
  327.  
  328. EE(1)
  329. B#K
  330. I/You can perform more flexible "cut and paste" using a text register.  (VEDIT
  331. Jr. has one register, VEDIT and VEDIT PLUS have 36 registers named "0" thru
  332. "9" and "A" thru "Z".)  To copy a block of text to a register, set the 1st
  333. marker and highlight the block as before.  Then press <Grey+> for "Copy to
  334. register" or <Grey-> for "Move to register" depending upon whether you want
  335. to copy or move the original block.  With VEDIT and VEDIT PLUS you are also
  336. prompted for the "register" name.  (Only use register "0" in this demo.)  As a
  337. shortcut simply press <Enter> or any <Grey> key again to use register "0".
  338.         --- Press <Esc> to continue ---/
  339. B -V
  340. EE(@)
  341. V
  342.  
  343. EE(1)
  344. B#K
  345. I/You can now insert (paste) the block of text anywhere in the file.  First,
  346. position the cursor where you want it inserted.  Then press <Grey*>.  With
  347. VEDIT and VEDIT PLUS you are also prompted for the "register" name.  Press
  348. <Grey*> again to insert register "0".  One advantage of using registers is
  349. that you can easily insert the same block of text several times in the file --
  350. inserting a register does not empty it.  Registers also let you copy a block
  351. from one file to another. (VEDIT also has <Shift-Del>, <Ctrl-Ins> and
  352. <Shift-Ins> defined as the "Cut", "Copy" and "Paste" functions.)
  353.         --- Press <Esc> to continue ---/
  354. B -V
  355. EE(@)
  356. V
  357.  
  358. EE(1)
  359. B#K
  360. I\The block copy/move operations are also available in the {BLOCK} menu. "Set
  361. marker" marks the block.  "Copy to cursor" and "Move to cursor" directly
  362. copy/move the block.  "Copy to register" and "Move to register" copy/move the
  363. block to a text register.  Finally, "Insert register" inserts a text register.
  364.  
  365. Many common edit functions can be performed step by step using the menu system
  366. or more directly using "hot keys".     --- Press <Esc> to continue ---\
  367. B -V
  368. EE(@)
  369. V
  370.  
  371. B#K
  372. ER demo.txt 0A        !Load demo file again
  373.  
  374. EE(1)
  375. B#K
  376. I/The search and search & replace operations are very flexible.
  377.  
  378. <F2>      Is the "search" key
  379. <Alt-F2>  Is the "search & replace" key
  380. <F3>      Performs the last "search" or "search & replace" again
  381.  
  382. Press <F2>.  At the prompt, type the desired 'search string', e.g. "the" and
  383. press <Enter>.  The cursor will move to the first occurrence of "the".
  384.         --- Press <Esc> to continue ---/
  385. B -V
  386. EE(@)
  387. V
  388.  
  389. EE(1)
  390. B#K
  391. I/To search for the next occurrence of "the" press <F3>.  Notice that it will
  392. find both "The" and "the" or even "THE".  Notice that it will also find the
  393. first three letters of "they", the word "other", etc.
  394. (Note: this method only finds words in the text FOLLOWING the cursor.)
  395.  
  396. To search for a different word press <F2> again and enter the new 'string'.
  397. Note that you can press [CURSOR UP] to reuse the previous string.  You can
  398. also edit the string being entered.
  399.         --- Press <Esc> to continue ---/
  400. B -V
  401. EE(@)
  402. V
  403.  
  404. EE(1)
  405. B#K
  406. I/Press <F2> and then press <F2> immediately again.  You can now select from
  407. the "search options".  "Again" lets you reuse the previous search string.
  408. "Begin" forces the search to start from the beginning of the text.  "Far" (the
  409. default) permits searching through very large files.  "Reverse" searches in
  410. the reverse direction.  "Word" restricts the search to entire words.
  411.  
  412. Press "R" and <Enter> to search in reverse.  Now type the word you want to
  413. search and <Enter>.  Note how the search is in reverse toward the beginning of
  414. the file.  Experiment.    --- Press <Esc> to continue ---/
  415.  
  416. B -V
  417. EE(@)
  418. V
  419.  
  420. EE(1)
  421. B#K
  422. I/More sophisticated searches are possible with "pattern matching".
  423. Here are six of the 22 "pattern matching codes":
  424.  
  425. |<    Beginning of line        |>    End of line
  426. |X    Anything "wildcard"        |D    Digit (0 - 9)
  427. |A    Letter (alphabet)        |U    Upper case letter
  428.  
  429. For example, to search for lines beginning with "the" press <F2> and then
  430. type "|<the" followed by <Enter>.      --- Press <Esc> to continue ---/
  431.  
  432. B -V
  433. EE(@)
  434. B
  435. V
  436.  
  437. EE(1)
  438. B#K
  439. I/To perform a search & replace press <Alt-F2>.  At the "Search?" prompt enter
  440. the desired search string just as before.  At the "Replace with?" prompt enter
  441. the replacement text.  You are then prompted for confirmation to make the
  442. replacement.
  443.  
  444. For example, let's replace "VEDIT PLUS" with "VEDIT+".  Press <Alt-F2>.  Press
  445. <Alt-F2> again to get the options.  Press "B" and <Enter>.  Type "VEDIT PLUS"
  446. and <Enter>.  Then type "VEDIT+" and <Enter>.  Notice the confirmation prompt.
  447. Press "O" to make the replacement.    --- Press <Esc> to continue ---/
  448.  
  449. B -V
  450. EE(@)
  451. V
  452.  
  453. EE(1)
  454. B#K
  455. I/Now press <F3> to find the second occurrence.  At the confirmation prompt
  456. press "Y" to make the replacement and immediately search for the next
  457. occurrence.  Or press "N" is not make the replacement, but keep searching.
  458. Press <F1> if you want assistance from the on-line help.
  459.  
  460. As above, you can selectively replace each occurrence.  However, to quickly
  461. replace all occurrences press "R" for "rest" at the confirmation prompt.
  462. (You can undo the entire global replacement by pressing <Alt-Bksp> once.)
  463.         --- Press <Esc> to continue ---/
  464. B -V
  465. EE(@)
  466. V
  467.  
  468. EE(1)
  469. B#K
  470. I/Press <F2> to get the search prompt.  Press <Up Arrow>.  Notice that the
  471. previous search string appears.  <Up Arrow> and <Down Arrow> let you select
  472. previous entries for many of VEDIT's prompts.  You can also edit previous
  473. entries with <Right Arrow>, <Left Arrow>, <Home>, <End> and <Del>.  Text typed
  474. in the middle of a line is inserted.  When the entry is correct, press
  475. <Enter>.  Feel free to experiment.
  476.  
  477.         --- Press <Esc> to continue ---/
  478. B -V
  479. EE(@)
  480. V
  481.  
  482. EE(1)
  483. B#K
  484. I\"Regular expressions" (VEDIT and VEDIT PLUS only) permit even more powerful
  485. search/replace pattern matching.  Although regular expressions are too complex
  486. to cover in this tutorial, you can try a simple example which will search for
  487. capitalized words of two or more letters.
  488.  
  489. Press <F2> twice to get the search options.  Press "Y" and <Enter> to select
  490. regular expressions.  Type "[A-Z][a-z]+" and press <Enter>.  This will search
  491. for the next capitalized word.  Press <F3> to search for the next word.
  492.         --- Press <Esc> to continue ---\
  493. B -V
  494. EE(@)
  495. B
  496. V
  497.  
  498. EE(1)
  499. B#K
  500. I\You can restrict search/replace operations to a highlighted block of text.
  501. First mark and highlight the block in the normal way (using <F9> twice).  To
  502. search the entire block place the cursor at the beginning of the block.  Any
  503. search and replace operations will now only occur within the block.
  504.  
  505. For maximum flexibility, VEDIT only performs a block search when the cursor is
  506. within the block.  This way you can highlight a block and then search the
  507. entire file for the destination to which you want to copy/move the block.
  508.         --- Press <Esc> to continue ---\
  509. B -V
  510. EE(@)
  511. B
  512. V
  513.  
  514. EE(1)
  515. B#K
  516. I\VEDIT can perform other block oriented operations.  The {EDIT, Lower/Upper
  517. case} sub-menu lets you convert all letters in a block to upper case, lower
  518. case or switch the case.  If no block is marked, or the cursor is not within
  519. the block, these functions only convert a single character.
  520.  
  521. You can also indent/undent a block.  Try it by highlighting a block of several
  522. lines.  Make sure the cursor is within the block and press <F8>; this indents
  523. all lines in the block.  <F7> will undent all lines in the block.
  524.         --- Press <Esc> to continue ---\
  525. B -V
  526. EE(@)
  527. B
  528. V
  529.  
  530. EE(1)
  531. B#K
  532. I\Most file handling can be performed with the {FILE} menu.  Press <Alt-F>.
  533. Then press <F1> and the on-line help will explain each item.
  534.  
  535. To prevent destroying the demo files, don't try any of the file operations at
  536. this time except for "Directory" which is covered next.
  537.  
  538.     --- Remove the Menu system and press <Esc> to continue ---\
  539. B -V
  540. EE(@)
  541. V
  542.  
  543. EE(1)
  544. B#K
  545. I/For example, you can display the directory:
  546.  
  547. Press <Alt-F> for the {FILE} menu.  Press "D" for "Directory".  To display the
  548. entire directory, press <Enter> at the "Filename:" prompt.  To display only
  549. files with a filename extension of ".HLP" type "*.HLP" and <Enter> at the
  550. prompt.
  551.  
  552.         --- Press <Esc> to continue ---/
  553. B -V
  554. EE(@)
  555. V
  556.  
  557. EE(1)
  558. B#K
  559. I/In this tutorial the <Esc> key is used to go to the next step.  Normally,
  560. however, the <Esc> key puts up the "ESCAPE MENU".  From this menu you can go
  561. to Command Mode (VEDIT PLUS only), remove block markers, exit VEDIT saving
  562. your file(s) or quit VEDIT.
  563.  
  564. The <Esc> key has now been switched to perform its normal function.  Press
  565. <Esc>.  Select "Command Mode" and press <Enter> to return to the main menu
  566. of this demo.  (Selecting anything else may stop the demo!)
  567.     --- Press <Esc> and select "Command Mode" ---/
  568. B -V
  569. EE(@)
  570. -YYE        !Restore ESC key to normal operation
  571. V
  572.